//
//  XWViewController.m
//  test
//
//  Created by 谢伟 on 16/3/23.
//  Copyright © 2016年 wei.xie. All rights reserved.
//

#import "XWViewController.h"

@interface XWViewController ()

@end

@implementation XWViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.backgroundColor = [UIColor redColor];
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(40, 200, 200, 44)];
    [btn setTitle:@"返回" forState:UIControlStateNormal];
    btn.backgroundColor = [UIColor blueColor];
    [btn addTarget:self action:@selector(btnClickAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
}

#pragma mark - 按钮点击方法监听
- (void)btnClickAction:(UIButton *)btn {
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
